﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Heaven.Texturing.Formats
{
    /// <summary>
    /// Floating-point format. 64-bit float format using 16 bits for each channel (alpha, blue, green, red).
    /// </summary>
    public class A16B16G16R16F : LayerFormat
    {
        /// <summary>
        /// Size in bytes of one pixel
        /// </summary>
        public override int ElementSize
        {
            get { return 8; }
        }

        /// <summary>
        /// Gets data from a layer with 
        /// converting from one format to current
        /// </summary>
        /// <param name="layer">Texture layer</param>
        /// <returns>Data in current format</returns>
        public override byte[] GetData(Layer layer)
        {
            byte[] data = new byte[layer.Data.Length];

            // No need to convert
            if (layer.Format == this)
            {
                layer.Data.CopyTo(data, 0);
                return data;
            }

            // TODO:
            throw new NotImplementedException();
        }
    }
}
